package com.corpgovernment.permission.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 角色表
 *
 * @author wangyujue
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "mb_role")
public class MbRole extends BaseEntity {
    /**
     * 角色id
     */
    @Column(name = "id")
    @OperateLogFieldDesc(value = "角色id")
    private Long id;
    /**
     * 角色名称
     */
    @Column(name = "name")
    @OperateLogFieldDesc(value = "角色名称")
    private String name;
    /**
     * 描述
     */
    @Column(name = "description")
    @OperateLogFieldDesc(value = "描述")
    private String description;
    /**
     * 组织id
     * 后台角色为空，否则不为空
     */
    @Column(name = "org_id")
    @OperateLogFieldDesc(value = "组织id")
    private String orgId;
    /**
     * 删除状态 0:未删除 1:删除 默认是0
     */
    @Column(name = "is_deleted")
    @OperateLogFieldDesc(value = "删除状态")
    private Boolean isDeleted;


    @Column(name = "is_system")
    @OperateLogFieldDesc(value = "是否是系统自带")
    private Boolean isSystem;

    @Column(name = "code")
    @OperateLogFieldDesc(value = "角色")
    private String code;

	/**
	 * 是否企服对账人
	 */
	@Column(name = "is_rec_manager")
	@OperateLogFieldDesc(value = "是否企服对账人")
	private Boolean isRecManager;

    @Column(name = "parent_id")
    @OperateLogFieldDesc(value = "父级ID")
	private Long parentId;

    @Column(name = "level")
    @OperateLogFieldDesc(value = "级别：1：一级角色 2：二级角色")
    private Integer level;
}
